﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class MovcostosFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As MovcostosBE
        Dim tmpMovcostos As MovcostosBE = New MovcostosBE()
        Try
            With tmpMovcostos
                .Cant = convertDTFromDb.ConvertDecimal(dr.Item("Cant"))
                .CodMat = convertDTFromDb.ConvertString(dr.Item("CodMat"))
                .Costo = convertDTFromDb.ConvertDecimal(dr.Item("Costo"))
                .Docto = convertDTFromDb.ConvertString(dr.Item("Docto"))
                .Exist = convertDTFromDb.ConvertDecimal(dr.Item("Exist"))
                .Fecha = convertDTFromDb.convertDateTime(dr.Item("Fecha"))
                .Id = convertDTFromDb.convertInt32(dr.Item("Id"))
                .IdAlmacen = convertDTFromDb.ConvertShort(dr.Item("IdAlmacen"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .Periodo = convertDTFromDb.convertInt32(dr.Item("Periodo"))
                .Ref = convertDTFromDb.ConvertShort(dr.Item("Ref"))
                .TipoMov = convertDTFromDb.ConvertString(dr.Item("TipoMov"))
            End With
            Return tmpMovcostos
        Catch ex As Exception
            Throw
        Finally
            tmpMovcostos = Nothing
        End Try
    End Function
End Class
